type Route = {
  /**
   * Any valid URL path
   */
  path?: string;
  /**
   * A React component to render only when the location matches.
   */
  component?: string | (() => any);
  wrappers?: string[];
  /**
   * navigate to a new location
   */
  redirect?: string;
  /**
   * When true, the active class/style will only be applied if the location is matched exactly.
   */
  exact?: boolean;
  routes?: Route[];
  title?: string;
  name?: string;
  key?: string;
};
const WEB_NAME = '重工报修系统后台';
const routes: Route[] = [
  {
    title: `${WEB_NAME}-登录`,
    name: '登录',
    path: '/',
    component: '@/pages/login/index.tsx',
  },
  {
    title: `${WEB_NAME}-登录`,
    name: '登录',
    path: '/login',
    component: '@/pages/login/index.tsx',
  },
  {
    path: '/401',
    component: '@/pages/error/401',
    name: '401',
    key: '401',
  },
  {
    path: '/403',
    component: '@/pages/error/403',
    name: '403',
    key: '403',
  },
  {
    path: '/404',
    component: '@/pages/error/404',
    name: '404',
    key: '404',
  },
  {
    path: '/500',
    component: '@/pages/error/500',
    name: '500',
    key: '500',
  },
  {
    path: '/',
    component: '@/layouts/index',
    routes: [
      {
        title: `修改密码`,
        name: `修改密码`,
        path: `/changePassword`,
        component: `@/pages/changePassword/index.tsx`,
      },
      {
        title: `用户管理`,
        name: `用户管理`,
        path: `/admin/userControl`,
        component: `@/pages/admin/userControl/index.tsx`,
      },
      {
        title: `批次管理`,
        name: `批次管理`,
        path: `/admin/batchControl`,
        component: `@/pages/admin/batchControl/index.tsx`,
      },
      {
        title: `课程管理`,
        name: `课程管理`,
        path: `/admin/courseControl`,
        component: `@/pages/admin/courseControl/index.tsx`,
      },
      {
        title: `题库管理`,
        name: `题库管理`,
        path: `/admin/topicControl`,
        component: `@/pages/admin/topicControl/index.tsx`,
      }
    ]
  }
  
];
export default routes;
